Alias Name | Member | Station Name |
---|---|---|
finance | john | fin1 |
finance | paul | fin2 |
finance | mary | fin3 |
corp | sharon | corp1 |
corp | pam | corp2 |
corp | peter | corp3 |
all | finance and corp | N/A |
postmaster | mailmgr | corp1 |
The /etc/aliases file entries based on the list of aliases generated by the administrator would look like this:
#############################################################
# Aliases in this file will NOT be expanded in the header
# from Mail, but WILL be visible over networks or from
# /bin/mail.
# >>>>>>>>> The program "newaliases" must be run after
# >> NOTE >> this file is updated for any changes to
# >>>>>>>>>> show through to sendmail.
#############################################################
start of common aliases--do not remove this line
# Add the following alias to enable Yellow Page aliases. If
# enabled, the YP database defines anything not defined in
# this file.
#+:+
# Alias for mailer daemon
MAILER-DAEMON:postmaster
# send mail likely to be lost to the mail server
rootcsh:postmaster
rootsh:postmaster
.
.
.
games:postmaster
# Following alias is required by RFC 822
# You should change 'root' in the first line below to
# the administrator of this machine, and un-comment the
# following line.
postmaster:root
root:mailmgr@corp1
# aliases to handle mail to msgs and news
nobody: /dev/null
# end of common aliases--do not remove this line
# corp.fictitious.com aliases
finance:john@fin1,paul@fin2,mary@fin3
corp:sharon@corp1,pam@corp2,peter@corp3
all:finance,corp
Update the aliases database:
If there is nothing wrong with your aliases database, newaliases lists the number of aliases and then return your prompt. If you see any other message, most likely there is a problem with your aliases file. See "Debugging Flags" for hints on troubleshooting the alias file./usr/bsd/newaliases